<div class="link">
            <a href="javascript:;"><?php echo $this->translate('全部商品分类'); ?><i class="triangle-b"></i></a>
        </div>
        <ul class="category">
            <?php
            if ($this->goods_class) {
                foreach ($this->goods_class as $class_key => $class_val) {
                    if($class_val['class_state'] == 0) continue;
                    ?>
                    <li>
                        <?php if ($class_val['class_top_id'] == 0) { ?>
                                <a href="<?php echo $this->url('frontgoodslist/default', array('class_id'=>$class_val['class_id'])); ?>" class="title"><?php echo $this->escapeHtml($class_val['class_name']); ?><i class="fa">&#xf105;</i></a>
                                    <?php if (isset($class_val['sub_class']) and !empty($class_val['sub_class'])) { ?>
                                        <div class="category-sub">
                                            <ul class="sub">
                                                <li><p>
                                            <?php foreach($class_val['sub_class'] as $sub_value) { ?>
                                                <a href="<?php echo $this->url('frontgoodslist/default', array('class_id'=>$sub_value['class_id'])); ?>"><?php echo $this->escapeHtml($sub_value['class_name']); ?></a>
                                            <?php } ?>
                                                </p></li>
                                            </ul>
                                        </div>
                                    <?php } ?>
                            <?php } ?>
                    </li>
                <?php } } ?>

            <?php
            if ($this->frontside_array) {
                foreach ($this->frontside_array as $frontside_key => $frontside_val) {
                    ?>
                    <li>
                        <?php if ($frontside_val['frontside_topid'] == 0) { ?>
                            <a href="<?php echo $frontside_val['frontside_url']; ?>" class="title" <?php if($frontside_val['frontside_new_window'] == 1) echo 'target="_blank"'; ?>><?php echo $this->escapeHtml($frontside_val['frontside_name']); ?><i class="fa">&#xf105;</i></a>
                            <?php if (isset($frontside_val['sub']) and !empty($frontside_val['sub'])) { ?>
                                <div class="category-sub">
                                    <ul class="sub">
                                        <li><p>
                                                <?php foreach($frontside_val['sub'] as $sub_value) { ?>
                                                    <a href="<?php echo $sub_value['frontside_url']; ?>" <?php if($sub_value['frontside_new_window'] == 1) echo 'target="_blank"'; ?>><?php echo $this->escapeHtml($sub_value['frontside_name']); ?></a>
                                                <?php } ?>
                                            </p></li>
                                    </ul>
                                </div>
                            <?php } ?>
                        <?php } ?>
                    </li>
                <?php } } ?>

        </ul>
<script>
    $(".category li").mouseenter(function() {
        $(this).addClass("hover");
    }).mouseleave(function() {
        $(this).removeClass("hover");
    });
    $(".category-box").mouseenter(function(){
        $(this).addClass("on");
    }).mouseleave(function(){
        $(this).removeClass("on");
    });
</script>